package zust.javaee.entity;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by liy on 2016/12/18.
 */
@Entity
@Table(name = "texperience")
public class Texperience {

    private Integer id;
    private Tplayer tplayer;
    private Tcorporation tcorporation;
    private String corporationName;
    private Short level;
    private Date joinTime;
    private Date leaveTime;
    private String position;
    private Integer demeritTimes;  //记过次数
    private Integer score;
    private String leaveReason;

    public Texperience() {
    }

    @Id
    @GeneratedValue
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "player_id")
    public Tplayer getTplayer() {
        return tplayer;
    }

    public void setTplayer(Tplayer tplayer) {
        this.tplayer = tplayer;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "corporation_id")
    public Tcorporation getTcorporation() {
        return tcorporation;
    }

    public void setTcorporation(Tcorporation tcorporation) {
        this.tcorporation = tcorporation;
    }

    @Column(name = "corporation_name")
    public String getCorporationName() {
        return corporationName;
    }

    public void setCorporationName(String corporationName) {
        this.corporationName = corporationName;
    }

    @Column(name = "level")
    public Short getLevel() {
        return level;
    }

    public void setLevel(Short level) {
        this.level = level;
    }

    @Column(name = "join_time")
    public Date getJoinTime() {
        return joinTime;
    }

    public void setJoinTime(Date joinTime) {
        this.joinTime = joinTime;
    }

    @Column(name = "leave_time")
    public Date getLeaveTime() {
        return leaveTime;
    }

    public void setLeaveTime(Date leaveTime) {
        this.leaveTime = leaveTime;
    }

    @Column(name = "position")
    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    @Column(name = "demerit_times")
    public Integer getDemeritTimes() {
        return demeritTimes;
    }

    public void setDemeritTimes(Integer demeritTimes) {
        this.demeritTimes = demeritTimes;
    }

    @Column(name = "score")
    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    @Column(name = "leave_reason")
    public String getLeaveReason() {
        return leaveReason;
    }

    public void setLeaveReason(String leaveReason) {
        this.leaveReason = leaveReason;
    }
}
